from rest_framework.routers import SimpleRouter
from iot.views.gradation import GradationModelViewSet
from iot.views.unit import UnitModelViewSet
from iot.views.warn import WarnModelViewSet
from iot.views.cabinet import CabinetModelViewSet
from iot.views.point import PointModelViewSet
# from iot.sub_ import Sub
# Sub(topic='iot', username='emqx', password='public', host='39.98.122.153', port=1883, client_id='iot_sub').start()


urls = SimpleRouter()
urls.register('gradations', GradationModelViewSet)
urls.register('unit', UnitModelViewSet)
urls.register('cabinet', CabinetModelViewSet)
urls.register('point', PointModelViewSet)
urls.register('warn', WarnModelViewSet)

urlpatterns = []
urlpatterns += urls.urls
